// SpringFunctionReader.cpp: implementation of the SpringFunctionReader class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "SpringFunctionReader.h"
#include "SpringFunction.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

IMPLEMENT_DYNAMIC_CREATE(SpringFunctionReader, PartDBReader, FunctionObject::eSELSPRING)

SpringFunctionReader::SpringFunctionReader()
{

}

SpringFunctionReader::~SpringFunctionReader()
{

}

FunctionObject* SpringFunctionReader::Reader(const _RecordsetPtr& rs)
{
	FunctionObject* pObject = PartDBReader::CreateObject(rs);
	ASSERT(pObject);
	
	Variable* pVariable = NULL;

	ASSERT(pObject->GetRuntimeClass() == RUNTIME_CLASS_EX(SpringFunction));

	SpringFunction* pSpring = static_cast<SpringFunction*>(pObject);
	
	pVariable = this->GetVariable(1, rs);
	ASSERT(pVariable);
	pSpring->SpringDH(pVariable);

	return pSpring;
}